import request from '@/utils/user-request'
import mallrequest from '@/utils/mall-request'

//1查询商品列表
export function getGoodsListApi(data) {
    return request({
        // url: 'http://10.168.60.233:8002/api/mall/goods/list',
        url: '/mall/goods/list',
        method: 'get',
        params: data
    })
}
//2创建商品
export function getCreateGoods(data) {
    return request({
        // url: 'http://10.168.60.233:8002/api/mall/goods/create',
        url: '/mall/goods/create',
        method: 'post',
        data
    })
}
//3修改商品
export function getUpdateGoods(data) {
    return request({
        // url: 'http://10.168.60.233:8002/api/mall/goods/update',
        url: '/mall/goods/update',
        method: 'post',
        data
    })
}
//4查询商品详情
export function getGoodsInfoApi(data) {
    return request({
        // url: 'http://10.168.60.233:8002/api/mall/goods/info',
        url: '/mall/goods/info',
        method: 'get',
        params: data
    })
}
//5上传图片
export function getUpImg(data) {
    return request({
        // url: 'http://10.168.60.233:8002/api/mall/goods/upImg',
        url: '/mall/goods/upImg',
        method: 'post',
        data
    })
}

// 获取商品详情
export function getGoodsInfo(data) {
    return mallrequest({
        url: '/mall/goods/info',
        method: 'get',
        params: data
    })
}
